package com.test.spring2025_3_31.Listener;

import com.test.spring2025_3_31.Constants.Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class FanoutRabbitListener {
    @RabbitListener(queues = Constants.FANOUT_QUEUE1)
    public void fanoutListener1(String message) {
        log.info(Constants.FANOUT_QUEUE1 + "消费：" + message);
    }

    @RabbitListener(queues = Constants.FANOUT_QUEUE2)
    public void fanoutListener2(String message) {
        log.info(Constants.FANOUT_QUEUE2 + "消费：" + message);
    }
}
